//
// Created by rany on 1/18/17.
//

#ifndef CHATROM_QUEUE_H
#define CHATROM_QUEUE_H

#include "message.h"

typedef struct Node {
    message_t data;
    struct Node * next;
} qnode_t, * pnode;

typedef struct Queue {
    pnode head, rear;
    int length;
} queue_t, * pqueue;

pqueue createQueue();
void enQueue(pqueue queue, message_t data);
message_t deQueue(pqueue queue);
message_t firstQueue(pqueue queue);
void destroyQueue(pqueue * queue);
int isEmpty(pqueue queue);

#endif //CHATROM_QUEUE_H
